<h2><?php echo ucfirst($txt->getWord('sale_location')); ?></h2>
<p><?php echo $adc->CurrentAd->getLocationAddress(); ?></p>
<p><?php echo $adc->CurrentAd->getLocationZip(); ?> <?php echo $adc->CurrentAd->getLocationCity(); ?></p>
<p><?php echo $adc->CurrentAd->getLocationCountryName(); ?></p><hr />
<div class="row-fluid">
    <div id="mapLocation" class="span12 overflow-hidden">
        <?php 
        if($adc->CurrentAd->getLocationCoords() == '')
        {
            if(($adc->CurrentAd->getLocationCity() != '') && ($adc->CurrentAd->getLocationAddress() != ''))
            {
                if(GOOGLE_API_KEY != '')
                {
                    $ggc = new GoogleGeoCode(GOOGLE_API_KEY);
                    $ggc->setAddress($adc->CurrentAd->getLocationAddress().', '.$adc->CurrentAd->getLocationZip().' '.$adc->CurrentAd->getLocationCity());
                    if($ggc->getCoords() == '')
                    { $ggc->setAddress($adc->CurrentAd->getLocationZip().' '.$adc->CurrentAd->getLocationCity()); }
                    if($ggc->getCoords() != '')
                    {
                        $adc->getCurrentAd()->setLocationCoords($ggc->getCoords());
                        $adc->getCurrentAd()->setDataChanged(1);
                        $adc->getCurrentAd()->updateCoords();
                    }
                }
            }
        }
        if(!($_REQUEST['print']))
		{
			if($adc->CurrentAd->getLocationCoords() != '')
			{
				echo '<div id="googleMapCanvas" style="width:'.$adc->getSetting('GoogleMapW').'px; height:'.$adc->getSetting('GoogleMapH').'px;"></div>';
				?>
				<script type="text/javascript">
				function initialize() {
				  var myOptions = {
					zoom: 7,
					center: new google.maps.LatLng(<?php echo $adc->CurrentAd->getLocationCoords(); ?>),
					mapTypeId: google.maps.MapTypeId.ROADMAP
				  }
				  var map = new google.maps.Map(document.getElementById("googleMapCanvas"), myOptions);
				  var marker = new google.maps.Marker({
					map: map,
					position: map.getCenter(),
					clickable: true,
					title: '<?php echo $adc->CurrentAd->getLocationAddress().', '.$adc->CurrentAd->getLocationZip().' '.$adc->CurrentAd->getLocationCity(); ?>'
					}); 
				}
				jQuery(document).ready(function() 
				{ initialize(); });
				</script>
				<?php 
				if($adc->CurrentAd->getLocationCoords() != '')  
				{
					?><br /><a class="hidden-print" target="_blank" href="http://maps.google.com/maps?ll=<?php echo str_replace(', ', ',', $adc->CurrentAd->getLocationCoords()); ?>&amp;z=14&amp;t=m&q=<?php echo $adc->CurrentAd->getLocationAddress(); ?>,+<?php echo $adc->CurrentAd->getLocationZip(); ?>+<?php echo $adc->CurrentAd->getLocationCity(); ?>,+<?php echo $adc->CurrentAd->getLocationCountryName(); ?>">Klikk her for st&oslash;rre kart.</a>
					<?php 
				}
			}
		}
        ?>
    </div>
</div>